package com.jams.goodox.entity;

import android.text.TextUtils;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 司机抢单页
 * Created by jams_zhen on 2017/5/25.
 */

public class FastCarOrder implements Serializable {
    public String userImg;//用户头像
    public boolean isMan;//是否男性
    public String userName;//用户名
    public String dateTime;
    public String peopleNumber;//乘车人数
    public String startPlace;
    public String endPlace;
    public boolean isPayMoney;//是否现金支付
    public List<AnnexBean> annexBeanList;//礼物图片
    public String goodName;
    public String payMoney;//
    public boolean isFareOrder;//是否是乘客订单
    public String communityName;//园区名
    public String carNum;//车牌号
    public String orderStatus;//
    public String userPhone;//电话
    public String orderId;

    public String toUserId;//私信对方id
    public String enterpriseName;

    public static final String Order_Whit_Accept = "0";// 待接收的乘客订单
    public static final String Order_UnComplete="1";//未完成
    public static final String Order_Complete="2";//订单完成
    public static final String Order_Cancel="3";//订单取消

    public String getUserImg() {
        return userImg;
    }

    public void setUserImg(String userImg) {
        this.userImg = userImg;
    }

    public boolean isMan() {
        return isMan;
    }

    public void setMan(boolean man) {
        isMan = man;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getDateTime() {
        return dateTime;
    }

    public void setDateTime(String dateTime) {
        this.dateTime = dateTime;
    }

    public String getPeopleNumber() {
        return peopleNumber;
    }

    public void setPeopleNumber(String peopleNumber) {
        this.peopleNumber = peopleNumber;
    }

    public String getStartPlace() {
        return startPlace;
    }

    public void setStartPlace(String startPlace) {
        this.startPlace = startPlace;
    }

    public String getEndPlace() {
        return endPlace;
    }

    public void setEndPlace(String endPlace) {
        this.endPlace = endPlace;
    }

    public boolean isPayMoney() {
        return isPayMoney;
    }

    public void setPayMoney(boolean payMoney) {
        isPayMoney = payMoney;
    }

    public List<AnnexBean> getAnnexBeanList() {
        return annexBeanList==null?new ArrayList<AnnexBean>():annexBeanList;
    }

    public void setAnnexBeanList(List<AnnexBean> annexBeanList) {
        this.annexBeanList = annexBeanList;
    }

    public String getGoodName() {
        return goodName;
    }

    public void setGoodName(String goodName) {
        this.goodName = goodName;
    }

    public String getPayMoney() {
        return payMoney;
    }

    public void setPayMoney(String payMoney) {
        this.payMoney = payMoney;
    }

    public boolean isFareOrder() {
        return isFareOrder;
    }

    public void setFareOrder(boolean fareOrder) {
        isFareOrder = fareOrder;
    }

    public String getCarNum() {
        return carNum;
    }

    public void setCarNum(String carNum) {
        this.carNum = carNum;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getCommunityName() {
        return communityName;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getToUserId() {
        return toUserId;
    }

    public void setToUserId(String toUserId) {
        this.toUserId = toUserId;
    }

    public String getEnterpriseName() {
        return enterpriseName;
    }

    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }

    /**
     * 此方法返回是否是等待车主接单的乘客订单
     *
     * @return 仅当为乘客订单&d订单状态为待接收
     */
    public boolean isWhitAcceptFare() {
        return isFareOrder && Order_Whit_Accept.equalsIgnoreCase(orderStatus);
    }

    /**
     * 用于设置是否显示取消
     * @return 仅当乘客订单且车牌号不为空且订单不是待接收
     */
    public boolean isCarNumShow() {
        return isFareOrder && !TextUtils.isEmpty(carNum)&&!Order_Whit_Accept.equalsIgnoreCase(orderStatus);
    }

    /**
     * 乘客带头像取消订单是否显示
     * @return
     */
    public boolean isCancelShow(){
        return isFareOrder&&Order_UnComplete.equalsIgnoreCase(orderStatus);
    }

}
